
  <div class="x_panel">
    <div class="x_content" style="display: block;">
      <!--表格主体内容-->
      <div class="nav navbar-right panel_toolbox">
        <a class="fa fa-plus" href="/adv/add.html"> 添加</a>
      </div>
      <br><br>
      <div class="cont">
        <table class="table table-bordered table-striped">
          <thead>
          <tr>
            <th width="100px">序号</th>
            <th>广告标题</th>
            <th>广告位置</th>
            <th>状态</th>
            <th>操作</th>
          </tr>
          </thead>
          <tbody>
          {foreach $adv.lists as $advitem}
          <tr>
            <td>{$advitem.ad_id}</td>
            <td>{$advitem.title}</td>
            <td>{if $advitem.position==1}去买模块{else}去玩模块{/if}</td>
            <td>{if $advitem.status==1}有效{else}无效{/if}</td>
            <td>
              <div class="x_content">
                <a class="btn btn-primary btn-xs" href="{eval U(['adv/edit','ad_id'=>$advitem.ad_id])}"> 编辑</a>
                <button class="btn btn-danger btn-xs" data-toggle="dropdown">{if $advitem.status==1}设为无效{else}设为有效{/if}
                  <i class="icon-angle-down"></i></button>
                <ul class="dropdown-menu">
                  <li><a href="{eval U(['adv/save-status','ad_id'=>$advitem.ad_id])}">确定</a></li>
                  <li><a href="javascript:;">取消</a></li>
                </ul>
              </div>
            </td>
          </tr>
          {/foreach}
          </tbody>
        </table>
        <!--分页-->

        {Yii::$app->view->render('/com/pager.php',['pager'=>$adv['pager']])}
      </div>
    </div>
  </div>

